package br.com.andreikeda.utility.gestor.finance.utils;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;

import br.com.andreikeda.utility.gestor.R;
import br.com.andreikeda.utility.gestor.finance.storage.database.dao.CategoryDAO;
import br.com.andreikeda.utility.gestor.finance.storage.database.model.Category;

/**
 * Created by ikeda on 22/01/15.\n\n
 * Contact: <b>andreikeda87@gmail.com</b> or <b>andre.ikeda@99motos.com</b>
 */
public class DatabaseUtils {

    public static void start(Context context, SQLiteDatabase mLite) {
        String[] categories = context.getResources().getStringArray(R.array.categories);
        for (int i = 0; i < categories.length; i++)
            CategoryDAO.getInstance().insert(mLite, new Category(i + 1, categories[i], 0));
    }

}
